import {Navigate} from 'react-router-dom'
// 鉴权组件
function Author(props){
    let token = localStorage.getItem("token");
    if(token){
        return (
            <div>
                {props.oldComponent}
            </div>
        )
    }
    return <Navigate to={`/login?redircturl=${props.oldPath}`} />
}

export default Author;